package com.ruoyi.teacher.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.teacher.api.domain.TeacherDto;
import com.ruoyi.teacher.api.domain.TeacherType;
import com.ruoyi.teacher.api.domain.UserToTeacherDto;
import com.ruoyi.teacher.api.factory.RemoteTeacherFallbackFactory;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;


/**
 * 远程教师服务
 *
 * @author 陈立高
 * @date 2024/03/23
 */
@FeignClient(contextId = "remoteTeacherService",
        value = ServiceNameConstants.TEACHER_SERVICE, fallbackFactory = RemoteTeacherFallbackFactory.class)
public interface RemoteTeacherService {

    /**
     * 工作通知
     *
     * @return {@link R}<{@link Void}>
     */
    @GetMapping("/task/workNotification")
    R<Void> workNotification();


    /**
     * 加载教师类型列表
     *
     * @return {@link R}<{@link List}<{@link TeacherType}>>
     */
    @GetMapping(value = "/teacher/teacherTypeList")
    R<AjaxResult> loadTeacherTypeList();

    /**
     * 用户服务保存教师
     *
     * @param dto dto
     * @return {@link R}<{@link Void}>
     */
    @PostMapping(value = "/teacher/userToTeacher")
    R<Void> userToTeacher(@RequestBody UserToTeacherDto dto);

    /**
     * 加载所有老师
     *
     * @return {@link R}<{@link AjaxResult}>
     */
    @GetMapping(value = "/loadTeachers")
    R<List<TeacherDto>> loadTeachers();


    /**
     * 考勤同步
     *
     * @return {@link R}<{@link Void}>
     */
    @GetMapping("/schedule/attendanceSynchronization")
    R<Void> attendanceSynchronization();


    /**
     * 打卡提醒
     *
     * @return {@link R}<{@link Void}>
     */
    @GetMapping("/schedule//punchReminder")
    R<Void> punchReminder();

    /**
     * 定时统计日报异常
     *
     * @return {@link R}<{@link Void}>
     */
    @GetMapping("/report/abnormalTimingStatistics")
    R<Void> abnormalTimingStatistics();

    /**
     * 定时统计异常
     *
     * @return {@link R}<{@link Void}>
     */
    @GetMapping("/report/timeNoticeTeacherReport")
    R<Void> timeNoticeTeacherReport();

    /**
     * 老师课程排版同步
     *
     * @param map 地图
     * @return {@link R}<{@link Void}>
     */
    @PostMapping("/batchScheduling")
    R<Void> batchScheduling(@RequestBody Map<String, String> map);
}
